package com.lantosec.hmrp.modules.morality.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.morality.entity.MoralityCycle;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评周期定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityCycle对象", description="考评周期定义")
public class MoralityCycleVO extends BaseVO<MoralityCycle> {
    private static final long serialVersionUID = 1L;


    public MoralityCycleVO(MoralityCycle entity){
        this.moralityCycleId = entity.getMoralityCycleId();
        this.moralityCycleName = entity.getMoralityCycleName();
        this.cycleStartDate = entity.getCycleStartDate();
        this.cycleEndDate = entity.getCycleEndDate();
        this.rewardStartDate = entity.getRewardStartDate();
        this.rewardEndDate = entity.getRewardEndDate();
        this.selfStartDate = entity.getSelfStartDate();
        this.selfEndDate = entity.getSelfEndDate();
        this.deptStartDate = entity.getDeptStartDate();
        this.deptEndDate = entity.getDeptEndDate();
        this.branchStartDate = entity.getBranchStartDate();
        this.branchEndDate = entity.getBranchEndDate();
        this.committeeStartDate = entity.getCommitteeStartDate();
        this.committeeEndDate = entity.getCommitteeEndDate();
    }

    @Override
    public MoralityCycle convertToEntity(){
        return new MoralityCycle(this);
    }


    @ApiModelProperty(value = "考评周期ID")
    @TableId(value = "morality_cycle_id", type = IdType.AUTO)
    private Integer moralityCycleId;

    @ApiModelProperty(value = "周期名称")
    private String moralityCycleName;

    @ApiModelProperty(value = "考评开始时间（格式：yyyy-MM-dd）")
    private String cycleStartDate;

    @ApiModelProperty(value = "考评结束时间（格式：yyyy-MM-dd）")
    private String cycleEndDate;

    @ApiModelProperty(value = "调取加减分项目开始时间")
    private String rewardStartDate;

    @ApiModelProperty(value = "调取加减分项目结束时间")
    private String rewardEndDate;

    @ApiModelProperty(value = "自评开始时间")
    private String selfStartDate;

    @ApiModelProperty(value = "自评结束时间")
    private String selfEndDate;

    @ApiModelProperty(value = "科室考评开始时间")
    private String deptStartDate;

    @ApiModelProperty(value = "科室考评结束时间")
    private String deptEndDate;

    @ApiModelProperty(value = "党支部考评开始时间")
    private String branchStartDate;

    @ApiModelProperty(value = "党支部考评结束时间")
    private String branchEndDate;

    @ApiModelProperty(value = "考评委员会考评开始时间")
    private String committeeStartDate;

    @ApiModelProperty(value = "考评委员会考评结束时间")
    private String committeeEndDate;


}
